package org.opportunity.wishlist.travelwish.pojo.model;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name="submenu")
public class SubMenu implements Serializable {

    private static final long serialVersionUID = 3269816427717952945L;
    
    private long id;
    private String propertyName;
    private String propertyDescription;
    private Set<ItemSubMenu> items = new HashSet<ItemSubMenu>(0);
       
    public SubMenu() {
    }
    
    @Id
    @GeneratedValue
    @Column(name="id")
    public long getId() {
        return id;
    }
    public void setId(long id) {
        this.id = id;
    }
    
    @Column(name="property_name")
    public String getPropertyName() {
        return propertyName;
    }
    public void setPropertyName(String propertyName) {
        this.propertyName = propertyName;
    }
    
    @Column(name="property_description")
    public String getPropertyDescription() {
        return propertyDescription;
    }
    public void setPropertyDescription(String propertyDescription) {
        this.propertyDescription = propertyDescription;
    }

    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER, mappedBy="subMenu")
    public Set<ItemSubMenu> getItems() {
        return items;
    }

    public void setItems(Set<ItemSubMenu> items) {
        this.items = items;
    }

}
